package other

import (
	"math/rand"
	"sync"
	"time"
)

func GetRand(num int) int {
	var mu sync.Mutex
	mu.Lock()
	v := rand.Intn(100)
	mu.Unlock()
	return v
}

func GetRand2(num int) int {
	rand.Seed(time.Now().UnixNano())
	var mu sync.Mutex
	mu.Lock()
	v := rand.Intn(num)
	mu.Unlock()
	return v
}
